/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fix.it.source.fixit;

import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.Date;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;

/**
 *
 * @author Biserka
 */
@RequestScoped
@Named
public class LogInIndexPresenter implements Serializable {
    @Inject
    private LogInBean logInBean;

    public LogInBean getLogInBean() {
        return logInBean;
    }
    public void setLogInBean(LogInBean logInBean) {
        this.logInBean = logInBean;
    }
    private Localuser user = new Localuser();

    public Localuser getUser() {
        return user;
    }
    public void setUser(Localuser user) {
        this.user = user;
    }
    /**
     * Creates a new instance of LogInIndexPresenter
     */
    public LogInIndexPresenter() {
    }
    public void action(){
        user.setFirstregistration(new Date());
        user.setIsactive(1);
        logInBean.storeLocalUser(user);
    }
}
